#!/bin/sh

# Compile hmm* tools
cd lib/hmm
./configure > compilehmm.log
make >> compilehmm.log
cp src/hmmbuild ../
cp src/hmmalign ../
cd ../..



echo "Trimming ..."
# Call the perl script
perl trimming.pl

if [ $? -ne 0 ]; then
	echo "Running trimming.pl has error"
	exit 1;
fi
echo "Trimming done"
echo "========================"

echo "Sorting ..."
perl sorting.pl

if [ $? -ne 0 ]; then
	echo "Running sorting.pl has error"
	exit 1;
fi

echo "Sorting done"
echo "========================"

echo "Spliting ..."
perl cutting.pl
if [ $? -ne 0 ]; then
	echo "Running cutting.pl has error"
	exit 1;
fi
echo "Spliting done"
echo "========================"